home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / Macintosh Sample Code / SC.014.CPlusTESample / Exceptions.cp < prev    next >
Encoding:
Text File  |  1994-11-18  |  691 b   |  29 lines  |  [TEXT/MPS ]

  1. /*------------------------------------------------------------------------------------------
  2.  
  3.     Program:    CPlusTESample 2.0
  4.     File:        Exceptions.cp
  5.     Uses:       Exceptions.h
  6.  
  7.     by Andrew Shebanow
  8.     of Apple Macintosh Developer Technical Support
  9.  
  10.     Copyright © 1989-1990 Apple Computer, Inc.
  11.     All rights reserved.
  12.  
  13. ------------------------------------------------------------------------------------------*/
  14.  
  15. #include "Exceptions.h"
  16.  
  17. extern "C" {
  18.     long gFailMessage;        // Current failure message
  19.     short gFailError;        // Current failure error
  20. };
  21.  
  22. pascal void StandardHandler(short e, long m, void* Handler_StaticLink)
  23. {
  24.     gFailError = e;
  25.     gFailMessage = m;
  26.     longjmp((jmp_buf) Handler_StaticLink, 1);
  27. }
  28.  
  29.